<template>
  <section :id="name" :ref="name">

    <div class="big-padding">
      <br>
      <div class="image-top"></div>
      <div class="container text-center">
        <br><br>
        <h2>爱护双眼，爱问<span class="white-color">专家</span>。</h2>
        <br>
        <div class="description">
          <p>写下关于眼睛健康的相关问题，每周将由中山大学中山眼科中心特约医生为你解答。</p>
          <img width="170px" src="../../../../static/images/sunyansen-opht-logo.png">
        </div>
        <a class="btn btn-dc btn-small" href="#">疑问解答</a>

      </div>
    </div>

  </section>
</template>

<script>

export default {
  props:{
    name:'',
  },
  components: {

  },
  computed: {

  },
  methods: {
    toDiv(){
      window.scrollTo({
        //滚动到元素位置
        top: this.$refs[this.name].getBoundingClientRect().top + window.scrollY,//推荐使用。getBoundingClientRect 相对于当前视口的位置
        behavior: "smooth" // 平滑滚动
      });
    },
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>



</style>

